/*
 * $Id: ASCKBIRequestHandler.java,v 1.1 2010/01/11 22:53:05 navdeep_mahajan Exp $
 * 
 * Copyright (C) 2006 General Electric Company. All Rights Reserved.
 * 
 * This software is the confidential and proprietary information of the General
 * Electric Company (GE). You shall not disclose this software and shall use it
 * only in accordance with the terms of the license agreement you entered into
 * with GE.
 * 
 * GE MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
 * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
 * NON-INFRINGEMENT. GE SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
 * AS A RESULT OF USING, MODIFYING, OR DISTRIBUTING THIS SOFTWARE OR ITS
 * DERIVATIVES.
 */
package com.ge.healthcare.autosc.common.commands;

import com.sshtools.j2ssh.authentication.KBIPrompt;
import com.sshtools.j2ssh.authentication.KBIRequestHandler;

/**
 * @author 212042764
 * 
 */
public class ASCKBIRequestHandler implements KBIRequestHandler {

	private String passCode = null;
	/**
	 * (non-Javadoc)
	 * 
	 * @see com.sshtools.j2ssh.authentication.KBIRequestHandler#showPrompts(java.lang.String,
	 *      java.lang.String, com.sshtools.j2ssh.authentication.KBIPrompt[])
	 */
	public void showPrompts(String name, String instructions,
			KBIPrompt[] prompts) {
		// Iterate through the prompts showing one at a time
		if (prompts != null) {
			for (int i = 0; i < prompts.length; i++) {
				prompts[i].setResponse(this.getPassCode());
			}
		}
		// Completed entering the prompts
	}
	/**
	 * @return the passCode
	 */
	public String getPassCode() {
		return passCode;
	}
	/**
	 * @param passCode the passCode to set
	 */
	public void setPassCode(String passCode) {
		this.passCode = passCode;
	}

}
